package com.guoyh.ext

import android.content.Context
import android.widget.ImageView
import com.xbkaoyan.libcommon.utils.GlideUtils

/**
 * @CreateDate: 7/19/21 7:23 PM
 * @Author: guoyh
 * @Description: java类作用描述
 */



fun ImageView.loadPic(any: Any, context: Context = this.context) {
    try {
        GlideUtils.loadImg(context, any, this)
    }catch (e:IllegalArgumentException){
        GlideUtils.loadImg(context.applicationContext,any,this)
    }
}

fun ImageView.loadPicH(any: Any, context: Context = this.context){
    try {
        GlideUtils.loadImgWithPlace(context, any, this)
    }catch (e:IllegalArgumentException){
        GlideUtils.loadImgWithPlace(context.applicationContext,any,this)
    }
}